import {request} from '@/utils/request'

const base = '/sys-config'

export function findSysConfigs(key) {
  return request({
    url: base,
    method: 'get',
    params: {
      key: key ? key : undefined
    }
  })
}

export function addSysConfig(data) {
  return request({
    url: base,
    method: 'post',
    data
  })
}

export function deleteSysConfig(sysConfigId) {
  return request({
    url: `${base}/${sysConfigId}`,
    method: 'delete'
  })
}

export function updateSysConfig(data) {
  return request({
    url: `${base}/${data.id}`,
    method: 'patch',
    data
  })
}



